<script setup lang="ts">
import { ref } from 'vue';
import MyComVue from './components/MyCom.vue'
// 父组件
const money = ref(100)

const h = (val: number) => {
  console.log('父组件收到了event1', val)
}
const h1 = (val: string) => {
  console.log('', val)
}
</script>

<template>
<div style="padding: 20px;margin: 20px; border:1px solid red;">
  <h1>父组件</h1>
  <p>{{money}}</p>

  <MyComVue @change-car="h1" car="小汽车" :money="money" />
  
  <MyComVue @event1="h"  :money="money" />
</div>
  <!-- <HelloWorld msg="Hello Vue 3 + TypeScript + Vite" /> -->

</template>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
